<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta charset="utf-8" />
        <title>{{pageTitle}} - {{config['application']['site']['name']}}</title>

        <meta name="description" content="overview &amp; stats" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

        <!-- bootstrap & fontawesome -->
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/bootstrap.min.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/font-awesome/4.0.3/css/font-awesome.min.css" />

        <!-- page specific plugin styles -->
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/jquery-ui.custom.min.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/chosen.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/datepicker.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/bootstrap-timepicker.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/daterangepicker.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/bootstrap-datetimepicker.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/colorpicker.css" />

        <!-- picture move
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/jquery.gritter.css" />
        -->

        <!-- text fonts -->
        <link rel="stylesheet" href="//fonts.useso.com/css?family=Open+Sans:400,300" />

        <!-- ace styles -->
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/ace.min.css" />

        <!--[if lte IE 9]>
            <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/ace-part2.min.css" />
        <![endif]-->
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/ace-skins.min.css" />
        <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/ace-rtl.min.css" />

        <!--[if lte IE 9]>
          <link rel="stylesheet" href="{{config['application']['site']['assetsUri']}}admin/css/ace-ie.min.css" />
        <![endif]-->

        <!-- inline styles related to this page -->

        <!-- ace settings handler -->
        <script src="{{config['application']['site']['assetsUri']}}admin/js/ace-extra.min.js"></script>

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

        <!--[if lte IE 8]>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/html5shiv.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/respond.min.js"></script>
        <![endif]-->

        <!-- basic scripts -->

        <!--[if !IE]> -->
        <script src="//ajax.useso.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>

        <!-- <![endif]-->

        <!--[if IE]>
        <script src="//ajax.useso.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <![endif]-->

        <!--[if !IE]> -->
        <script type="text/javascript">
            window.jQuery || document.write("<script src='{{config['application']['site']['assetsUri']}}admin/js/jquery.min.js'>"+"<"+"/script>");
        </script>

        <!-- <![endif]-->

        <!--[if IE]>
        <script type="text/javascript">
         window.jQuery || document.write("<script src='{{config['application']['site']['assetsUri']}}admin/js/jquery1x.min.js'>"+"<"+"/script>");
        </script>
        <![endif]-->

    </head>

    <body class="no-skin">
        <div id="navbar" class="navbar navbar-default">
            <script type="text/javascript">
                try{ace.settings.check('navbar' , 'fixed')}catch(e){}
            </script>

            <div class="navbar-container" id="navbar-container">
                <button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler">
                    <span class="sr-only">Toggle sidebar</span>

                    <span class="icon-bar"></span>

                    <span class="icon-bar"></span>

                    <span class="icon-bar"></span>
                </button>

                <div class="navbar-header pull-left">
					<a href="#" class="navbar-brand">
						<small>
							<i class="fa fa-leaf"></i>
                    {{config['application']['site']['name']}}
						</small>
					</a>
                </div>

                <div class="navbar-buttons navbar-header pull-right" role="navigation">
                    <ul class="nav ace-nav">
                        <li class="light-blue">
                        <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                            <img class="nav-user-photo" src="{{config['application']['site']['assetsUri']}}admin/avatars/user.jpg" alt="Jason's Photo" />
                            <span class="user-info">
                                <small>Welcome,</small>
                                codejm
                            </span>
                        </a>

                        </li>
                    </ul>
                </div>
            </div><!-- /.navbar-container -->
        </div>

        <div class="main-container" id="main-container">
            <script type="text/javascript">
                try{ace.settings.check('main-container' , 'fixed')}catch(e){}
            </script>

            <div id="sidebar" class="sidebar                  responsive">
                <script type="text/javascript">
                    try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
                </script>

                <ul class="nav nav-list">
                <li class="active"><a href="/backend/"><i class="menu-icon fa fa-tachometer"></i><span class="menu-text"> 后台主页</span></a><b class="arrow"></b></li>
                <!--<li><a href="#" class="dropdown-toggle"> <i class="menu-icon fa fa-desktop"></i> <span class="menu-text"> 用户管理</span> <b class="arrow fa fa-angle-down"></b> </a> <b class="arrow"></b><ul class="submenu"><li> <a href="/backend/members/index"> <i class="menu-icon fa fa-caret-right"></i> 用户列表</a> <b class="arrow"></b> </li><li> <a href="/backend/members/add"> <i class="menu-icon fa fa-caret-right"></i> 添加用户</a> <b class="arrow"></b> </li><li> <a href="/backend/roles/index"> <i class="menu-icon fa fa-caret-right"></i> 角色管理</a> <b class="arrow"></b> </li><li> <a href="/backend/roles/add"> <i class="menu-icon fa fa-caret-right"></i> 添加角色</a> <b class="arrow"></b> </li></ul> </li>-->
                </ul>
                <!-- /.nav-list -->

                <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
                    <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
                </div>

                <script type="text/javascript">
                    try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
                </script>
            </div>

            <div class="main-content">

                <div class="breadcrumbs" id="breadcrumbs">
                    <script type="text/javascript">
                        try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
                    </script>

                    <ul class="breadcrumb">
                        <li>
                        <i class="ace-icon fa fa-home home-icon"></i>
                        <a href="#">主页</a>
                        </li>
                        {%  block page_title %}
                        <li class="active">{{pageTitle}}</li>
                        {% endblock %}
                    </ul><!-- /.breadcrumb -->
                    {% block page_btn %}
                    {% endblock %}
                </div>

                <div class="page-content">

                    <!-- 消息提醒S -->
                    {% if Message is not empty %}
                    <div class="alert alert-success">
                        <button type="button" class="close" data-dismiss="alert"> <i class="ace-icon fa fa-times"></i> </button>
                        <strong> <i class="ace-icon fa fa-check"></i> {{Message}} </strong> <br>
                    </div>
                    {% endif %}

                    {% if ErrorMessage is not empty %}
                    <div class="alert alert-warning">
                        <button type="button" class="close" data-dismiss="alert"> <i class="ace-icon fa fa-times"></i> </button>
                        <strong>{{ErrorMessage}}</strong> <br>
                    </div>
                    {% endif %}

                    {% if ErrorMessageStop is not empty %}
                    <div class="alert alert-danger">
                        <button type="button" class="close" data-dismiss="alert"> <i class="ace-icon fa fa-times"></i> </button>
                        <strong> <i class="ace-icon fa fa-times"></i>{{ErrorMessageStop}}</strong> <br>
                    </div>
                    {{ include('layouts/footer.html') }}
                    {% endif %}
                    <!-- 消息提醒E -->

                    <div class="ace-settings-container" id="ace-settings-container">
                        <div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
                            <i class="ace-icon fa fa-cog bigger-150"></i>
                        </div>

                        <div class="ace-settings-box clearfix" id="ace-settings-box">
                            <div class="pull-left width-50">
                                <div class="ace-settings-item">
                                    <div class="pull-left">
                                        <select id="skin-colorpicker" class="hide">
                                            <option data-skin="no-skin" value="#438EB9">#438EB9</option>
                                            <option data-skin="skin-1" value="#222A2D">#222A2D</option>
                                            <option data-skin="skin-2" value="#C6487E">#C6487E</option>
                                            <option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
                                        </select>
                                    </div>
                                    <span>&nbsp; Choose Skin</span>
                                </div>

                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar" />
                                    <label class="lbl" for="ace-settings-navbar"> Fixed Navbar</label>
                                </div>

                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar" />
                                    <label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
                                </div>

                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs" />
                                    <label class="lbl" for="ace-settings-breadcrumbs"> Fixed Breadcrumbs</label>
                                </div>

                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl" />
                                    <label class="lbl" for="ace-settings-rtl"> Right To Left (rtl)</label>
                                </div>

                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container" />
                                    <label class="lbl" for="ace-settings-add-container">
                                        Inside
                                        <b>.container</b>
                                    </label>
                                </div>
                            </div><!-- /.pull-left -->

                            <div class="pull-left width-50">
                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-hover" />
                                    <label class="lbl" for="ace-settings-hover"> Submenu on Hover</label>
                                </div>

                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-compact" />
                                    <label class="lbl" for="ace-settings-compact"> Compact Sidebar</label>
                                </div>

                                <div class="ace-settings-item">
                                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-highlight" />
                                    <label class="lbl" for="ace-settings-highlight"> Alt. Active Item</label>
                                </div>
                            </div><!-- /.pull-left -->
                        </div><!-- /.ace-settings-box -->
                    </div><!-- /.ace-settings-container -->

                    {% block content %}
                    {% endblock %}


                </div><!-- /.page-content -->
            </div><!-- /.main-content -->
            <div class="footer">
                <div class="footer-inner">
                    <div class="footer-content">
                        <span class="bigger-120">
                            <span class="blue bolder">{{config['application']['site']['name']}}</span>
                            {{config['application']['site']['companyname']}} &copy; 2013-2014
                        </span>
                    </div>
                </div>
            </div>

            <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
                <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
            </a>
        </div><!-- /.main-container -->
        <!-- basic scripts -->

        <!--[if !IE]> -->
        <script src="//ajax.useso.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>

        <!-- <![endif]-->

        <!--[if IE]>
        <script src="//ajax.useso.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <![endif]-->

        <!--[if !IE]> -->
        <script type="text/javascript">
            window.jQuery || document.write("<script src='{{config['application']['site']['assetsUri']}}admin/js/jquery.min.js'>"+"<"+"/script>");
        </script>

        <!-- <![endif]-->

        <!--[if IE]>
        <script type="text/javascript">
         window.jQuery || document.write("<script src='{{config['application']['site']['assetsUri']}}admin/js/jquery1x.min.js'>"+"<"+"/script>");
        </script>
        <![endif]-->

        <script type="text/javascript">
            if('ontouchstart' in document.documentElement) document.write("<script src='{{config['application']['site']['assetsUri']}}admin/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
        </script>
        <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

        <!-- page specific plugin scripts -->

        <!--[if lte IE 8]>
          <script src="{{config['application']['site']['assetsUri']}}admin/js/excanvas.min.js"></script>
        <![endif]-->

        <!-- page specific plugin scripts -->
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.dataTables.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.dataTables.bootstrap.js"></script>
        <!--[if lte IE 8]>
          <script src="{{config['application']['site']['assetsUri']}}admin/js/excanvas.min.js"></script>
        <![endif]-->
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery-ui.custom.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.ui.touch-punch.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/chosen.jquery.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/fuelux/fuelux.spinner.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/date-time/bootstrap-datepicker.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/date-time/bootstrap-timepicker.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/date-time/moment.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/date-time/daterangepicker.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/date-time/bootstrap-datetimepicker.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/bootstrap-colorpicker.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.knob.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.autosize.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.inputlimiter.1.3.1.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.maskedinput.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/bootstrap-tag.min.js"></script>

        <!-- page specific plugin scripts -->
        <script src="{{config['application']['site']['assetsUri']}}admin/js/markdown/markdown.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/markdown/bootstrap-markdown.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.hotkeys.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/bootstrap-wysiwyg.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/bootbox.min.js"></script>

        <!-- ace scripts -->
        <script src="{{config['application']['site']['assetsUri']}}admin/js/ace-elements.min.js"></script>
        <script src="{{config['application']['site']['assetsUri']}}admin/js/ace.min.js"></script>

        <!-- 图片移动/拖位
        <script src="{{config['application']['site']['assetsUri']}}admin/js/jquery.gridly.js"></script>
        -->
        <!-- 图片异步上传 -->
        <script src="{{config['application']['site']['assetsUri']}}admin/js/ajaxfileupload.js"></script>

        {% if curaction == 'index' %}
        <script type="text/javascript">

            $(document).ready(function($) {
                $(document).on('click', 'th input:checkbox' , function(){
                    var that = this;
                    $(this).closest('table').find('tr > td:first-child input:checkbox')
                    .each(function(){
                        this.checked = that.checked;
                        $(this).closest('tr').toggleClass('selected');
                    });
                });
                $('.adel').click(function(){
                    var r=confirm("真的要删除吗？");
                    if(r == true) {
                        return true;
                    } else {
                        return false;
                    }
                });

            });
        </script>
        {% endif %}

        {% block script %} {% endblock %}
    </body>
</html>
